3.143 \(\int \frac {\sqrt {a+a \sec (e+f x)}}{c+c \sec (e+f x)} \, dx\)

Optimal. Leaf size=91 \[ \frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{c f}-\frac {\sqrt {2} \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a \sec (e+f x)+a}}\right )}{c f} \]

[Out]

2*arctan(a^(1/2)*tan(f*x+e)/(a+a*sec(f*x+e))^(1/2))*a^(1/2)/c/f-arctan(1/2*a^(1/2)*tan(f*x+e)*2^(1/2)/(a+a*sec
(f*x+e))^(1/2))*2^(1/2)*a^(1/2)/c/f

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {21, 3776, 3774, 203, 3795} \[ \frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{c f}-\frac {\sqrt {2} \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a \sec (e+f x)+a}}\right )}{c f} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Sec[e + f*x]]/(c + c*Sec[e + f*x]),x]

[Out]

(2*Sqrt[a]*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/(c*f) - (Sqrt[2]*Sqrt[a]*ArcTan[(Sqrt[a]*T
an[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sec[e + f*x]])])/(c*f)

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 3774

Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[(-2*b)/d, Subst[Int[1/(a + x^2), x], x, (b*C
ot[c + d*x])/Sqrt[a + b*Csc[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 3776

Int[1/Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[1/a, Int[Sqrt[a + b*Csc[c + d*x]], x], x]
- Dist[b/a, Int[Csc[c + d*x]/Sqrt[a + b*Csc[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 3795

Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2/f, Subst[Int[1/(2
*a + x^2), x], x, (b*Cot[e + f*x])/Sqrt[a + b*Csc[e + f*x]]], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0
]

Rubi steps

\begin {align*} \int \frac {\sqrt {a+a \sec (e+f x)}}{c+c \sec (e+f x)} \, dx &=\frac {a \int \frac {1}{\sqrt {a+a \sec (e+f x)}} \, dx}{c}\\ &=\frac {\int \sqrt {a+a \sec (e+f x)} \, dx}{c}-\frac {a \int \frac {\sec (e+f x)}{\sqrt {a+a \sec (e+f x)}} \, dx}{c}\\ &=-\frac {(2 a) \operatorname {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}+\frac {(2 a) \operatorname {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}\\ &=\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}-\frac {\sqrt {2} \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a+a \sec (e+f x)}}\right )}{c f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.65, size = 133, normalized size = 1.46 \[ -\frac {i \sqrt {1+e^{2 i (e+f x)}} \sqrt {a (\sec (e+f x)+1)} \left (\sinh ^{-1}\left (e^{i (e+f x)}\right )-\sqrt {2} \tanh ^{-1}\left (\frac {-1+e^{i (e+f x)}}{\sqrt {2} \sqrt {1+e^{2 i (e+f x)}}}\right )-\tanh ^{-1}\left (\sqrt {1+e^{2 i (e+f x)}}\right )\right )}{c f \left (1+e^{i (e+f x)}\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Sec[e + f*x]]/(c + c*Sec[e + f*x]),x]

[Out]

((-I)*Sqrt[1 + E^((2*I)*(e + f*x))]*(ArcSinh[E^(I*(e + f*x))] - Sqrt[2]*ArcTanh[(-1 + E^(I*(e + f*x)))/(Sqrt[2
]*Sqrt[1 + E^((2*I)*(e + f*x))])] - ArcTanh[Sqrt[1 + E^((2*I)*(e + f*x))]])*Sqrt[a*(1 + Sec[e + f*x])])/(c*(1
+ E^(I*(e + f*x)))*f)

________________________________________________________________________________________

fricas [A]  time = 0.56, size = 293, normalized size = 3.22 \[ \left [\frac {\sqrt {2} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, a \cos \left (f x + e\right )^{2} + 2 \, a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) + 2 \, \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right )}{2 \, c f}, \frac {\sqrt {2} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) - 2 \, \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right )}{c f}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(1/2)/(c+c*sec(f*x+e)),x, algorithm="fricas")

[Out]

[1/2*(sqrt(2)*sqrt(-a)*log((2*sqrt(2)*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x +
e) + 3*a*cos(f*x + e)^2 + 2*a*cos(f*x + e) - a)/(cos(f*x + e)^2 + 2*cos(f*x + e) + 1)) + 2*sqrt(-a)*log((2*a*c
os(f*x + e)^2 - 2*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) + a*cos(f*x + e)
- a)/(cos(f*x + e) + 1)))/(c*f), (sqrt(2)*sqrt(a)*arctan(sqrt(2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f
*x + e)/(sqrt(a)*sin(f*x + e))) - 2*sqrt(a)*arctan(sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(
a)*sin(f*x + e))))/(c*f)]

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(1/2)/(c+c*sec(f*x+e)),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check si
gn: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check si
gn: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check si
gn: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)4*sqrt(2)*(-1/8*sqrt(-a)*ln((sqrt(-a*tan(1/2*(f*x+exp(1)))^2+a
)-sqrt(-a)*tan(1/2*(f*x+exp(1))))^2)/c-1/4*a*sqrt(-a)*ln(abs(2*(sqrt(-a*tan(1/2*(f*x+exp(1)))^2+a)-sqrt(-a)*ta
n(1/2*(f*x+exp(1))))^2-4*sqrt(2)*abs(a)-6*a)/abs(2*(sqrt(-a*tan(1/2*(f*x+exp(1)))^2+a)-sqrt(-a)*tan(1/2*(f*x+e
xp(1))))^2+4*sqrt(2)*abs(a)-6*a))/sqrt(2)/c/abs(a))*sign(cos(f*x+exp(1)))/f

________________________________________________________________________________________

maple [A]  time = 1.78, size = 141, normalized size = 1.55 \[ -\frac {\sqrt {\frac {a \left (1+\cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )}}\, \sqrt {-\frac {2 \cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}}\, \left (\ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}}\, \sin \left (f x +e \right )+\cos \left (f x +e \right )-1}{\sin \left (f x +e \right )}\right )+\sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right )\right )}{c f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sec(f*x+e))^(1/2)/(c+c*sec(f*x+e)),x)

[Out]

-1/c/f*(a*(1+cos(f*x+e))/cos(f*x+e))^(1/2)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*(ln(-(-(-2*cos(f*x+e)/(1+cos(f
*x+e)))^(1/2)*sin(f*x+e)+cos(f*x+e)-1)/sin(f*x+e))+2^(1/2)*arctanh(1/2*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*si
n(f*x+e)/cos(f*x+e)*2^(1/2)))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {a \sec \left (f x + e\right ) + a}}{c \sec \left (f x + e\right ) + c}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(1/2)/(c+c*sec(f*x+e)),x, algorithm="maxima")

[Out]

integrate(sqrt(a*sec(f*x + e) + a)/(c*sec(f*x + e) + c), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}}{c+\frac {c}{\cos \left (e+f\,x\right )}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(e + f*x))^(1/2)/(c + c/cos(e + f*x)),x)

[Out]

int((a + a/cos(e + f*x))^(1/2)/(c + c/cos(e + f*x)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\sqrt {a \sec {\left (e + f x \right )} + a}}{\sec {\left (e + f x \right )} + 1}\, dx}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))**(1/2)/(c+c*sec(f*x+e)),x)

[Out]

Integral(sqrt(a*sec(e + f*x) + a)/(sec(e + f*x) + 1), x)/c

________________________________________________________________________________________